﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JTicket.UI
{
    public partial class S_SaleTicket : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Bind();
        }
        void Bind()
        {
            if (Request.QueryString["TitleCode"] != null)
            {
                this.TitleCode.Value = Request.QueryString["TitleCode"].ToString();
                this.SubCode.Value = Request.QueryString["SubCode"].ToString();
                this.ThCode.Value = Request.QueryString["ThCode"].ToString();
                BLL.D_Area bllArea = new BLL.D_Area();
                BLL.D_TitleInfo bllTitle = new BLL.D_TitleInfo();
                Model.D_Area area =
                    bllArea.GetModel(Request.QueryString["SubCode"].ToString());
                Model.D_TitleInfo titleinfo =
                    bllTitle.GetModel(Request.QueryString["TitleCode"].ToString());
                this.Yarea.InnerHtml =
                   string.Format("{0} -> {1}",
                  area.ThName, area.AreaName);
                this.sptitleinfo.InnerHtml = string.Format("{0} - {1}",titleinfo.Begindate.Value.ToString("yyyy-MM-dd HH:mm:ss"), titleinfo.Stitlename);

            }
        }
    }
}